<?php 
/*
$sSql = "SHOW TABLES LIKE 'wfm_rec_%'";
$objDB->exec($sSql,'selModMenu');
$sListMod = "''";
while($aRMM = $objDB->fetch('selModMenu')) {
	$aX = array_values($aRMM);
	$sListMod .= ",'".substr($aX[0],8)."'";
}
$sSql = "SELECT m.id_modulo, m.cod_modulo, m.menu_grup, m.menu_seq, m.menu_tit "
	." FROM wfm_moduli m WHERE cod_modulo IN ($sListMod) "
	." ORDER BY m.menu_seq, m.menu_tit, m.cod_modulo";
$objDB->exec($sSql,'selModMenu');
$aMenuWfm = array();
$idModDef = 0;
while($aRMM = $objDB->fetch('selModMenu')) {
	if ($aRMM['menu_grup']=='') {
		$aRMM['menu_grup']= 'ZZZZZZ';
	}
	if ($idModDef == 0) $idModDef = $aRMM['id_modulo'];
	$aMenuWfm[$aRMM['menu_grup']][] = $aRMM;
}
ksort($aMenuWfm);
if ($idModDef == 0) {
	$sHrefDef = OVF_URL_ROOT."/app/wfma/cnfg/modList.php?xsn=".XSN;
} else {
	$sHrefDef = OVF_URL_ROOT."/app/wfma/oper/recList.php?id=$idModDef&xsn=".XSN;
}
if ($codMenu=='wfma' || $bAllMenuOpen) {
	$contaRigheMenu += 3;
?>
<div class='tit1' style='text-align:left;padding:1px;background-color:<?=OVF_COLORE_SFONDO?>;margin-bottom:2px;'>
	<div class='tit1' style='padding:2px;'>
		<a class='tit1' href="<?=$sHrefDef?>">
		<?=getHtmlImgGen('Work-Flow', 140, 20, OVF_COLORE_SFONDO, OVF_COLORE_TESTO, 12)?></a>
	</div>
	<div class='cmd1' style='padding:5px 0px 8px 10px;background-color:#ffffff;'>
		<div class='cmd1' style='padding:3px 0px 3px 0px;'>
			<a class='cmd1' href="<?=OVF_URL_ROOT?>/app/wfma/cnfg/modList.php?xsn=<?=XSN?>"><?=_t('Configuratore')?></a>
		</div>
<?
	foreach($aMenuWfm as $grupX => $aGX) {
		if ($grupX != 'ZZZZZZ') {
?>
		<div class='cmd1' style='padding:10px 0px 0px 0px;'>
			<?=$grupX?>
		</div>
<?
		}
		foreach($aGX as $kX => $aMX) {
			$sHref = OVF_URL_ROOT."/app/wfma/oper/recList.php?id=".$aMX['id_modulo']."&xsn=".XSN;
			if ($grupX=='ZZZZZZ') {
?>
		<div class='cmd1' style='padding:10px 0px 10px 0px;'>
			<a class='cmd1' href="<?=$sHref?>"><?=$aMX['menu_tit']?></a>
		</div>
<?
			} else {
?>
		<div class='cmd1' style='padding:0px 0px 0px 0px;'>
			-&nbsp;&nbsp;<a class='cmd1' href="<?=$sHref?>"><?=$aMX['menu_tit']?></a>
		</div>
<?
			}
		}
	}
?>
	</div>
</div>
<?php 
} else {
	$contaRigheMenu += 2;
?>
<div class='lab1' style='padding:1px;margin-bottom:2px;'>
	<div class='lab1' style='padding:2px;'>
	<a class='lab1' href="<?=$sHrefDef?>">
	<?=getHtmlImgGen('Work-Flow', 140, 20, 'dddddd', '000000', 12)?></a>
	</div>
</div>
<?php 
}
*/